# Dockerfile

FROM php:8.1.3-fpm

# 安装常用扩展 + xdebug
RUN apt-get update && apt-get install -y \
    git curl zip unzip libzip-dev libpng-dev libonig-dev libxml2-dev \
    && docker-php-ext-install pdo_mysql zip mbstring exif pcntl bcmath gd \
    && pecl install xdebug \
    && docker-php-ext-enable xdebug

# Xdebug 配置
COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini

# 安装 Composer
COPY --from=composer:2.5.8 /usr/bin/composer /usr/bin/composer

WORKDIR /var/www/swtb
